package com.etc.mapper;


import com.etc.pojo.News;
import org.apache.ibatis.annotations.Param;
import org.aspectj.apache.bcel.generic.NEW;
import org.springframework.stereotype.Repository;


import java.util.List;
//@Repository
public interface NewsDao {
    /**
     * 增加动态根据时间显示前三条
     */
    int addNews(News news);
    /**
     * 查询动态
     */
    List<News> queryallNews();
    /**
     * 根据id删除
     */
    int deleteNews(int newsId);

    /**
     * 查询全部
     */
    List<News> queryall();

    List<News> queryPageAllNews();

    /**
     * 模糊查询动态
     * @author gyx
     */
    List<News> queryNewsByLike(@Param("userId") int userId, @Param("newsDetail")String newsDetail);
}
